package work;

import com.mchange.v2.c3p0.ComboPooledDataSource;

import javax.sql.DataSource;
import java.sql.Connection;

public class JDBCUtils1 {
    static ComboPooledDataSource cpds = new ComboPooledDataSource();
    // 获得连接
    public static Connection getConnection() throws Exception {
        //获得连接
        return cpds.getConnection();
    }
    public static DataSource getDataSource() throws Exception {
        return cpds;
    }
}
